﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;


namespace QLTV
{
    static class Program
    {
        public static string username { get; set; }
        public static string language { get; set; }
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            DevExpress.Skins.SkinManager.EnableFormSkins();
            DevExpress.UserSkins.OfficeSkins.Register();
            DevExpress.UserSkins.BonusSkins.Register();
         
            DevExpress.XtraGrid.Localization.GridLocalizer.Active = new VietnamLocalization(new DevExpress.XtraGrid.Localization.GridResLocalizer());
            DevExpress.XtraEditors.Controls.Localizer.Active = new vnTextEdit();
            DevExpress.XtraLayout.Localization.LayoutLocalizer.Active = new vnLayoutControl();
            //defaultLookAndFeel
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);
            Forms.BaoMat.frmLogin logon = new Forms.BaoMat.frmLogin();
            Application.Run(logon);
            if (logon.LogonSuccessful)
            {
                 QLTV.Database.dsUsersTableAdapters.tblUserProfileTableAdapter tadProfile = new Database.dsUsersTableAdapters.tblUserProfileTableAdapter();
                   DevExpress.LookAndFeel.UserLookAndFeel.Default.SkinName =tadProfile.getTheme(Program.username) ;
                Application.Run(new frmMain());
            }
           

        }
    }
}
